<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>伸缩比</title>
    <style>
        .box{
            display: flex;
            width: 80%;
            height: 150px;
            border: 1px solid #000;
            margin: 50px auto;
        }
        .box div{
            background-color: pink;
            /* 写1，就是占一份 */
            flex:1;
        }
        .box div:nth-child(2){
            background-color: purple;
            /* 写2，就是占两份 */
            flex:2;
            margin: 0 10px;
        }
    </style>
</head>
<body>
    <div class="box">
        <div>1</div>
        <div>2</div>
        <div>3</div>
    </div>
</body>
</html>